class Solution:
    def judgeCircle(self, moves: str) -> bool:
        hori,vert=0,0
        for i in moves:
            if i=='L':
                hori-=1
            elif i=='U':
                vert+=1
            elif i=='D':
                vert-=1
            else:
                hori+=1
        return True if hori==0 and vert==0 else False